import os 
import numpy 

with open('CCSD_ENERGY', 'r') as cc_e:
    data=cc_e.read()
    data=data.split()
    data=numpy.array(data)
    data = numpy.asarray(data, dtype=float)
#    print(data)
with open('CCSD_ENERGY.bak', 'r') as cc_eb:
    datab=cc_eb.read()
    datab=datab.split()
    datab=numpy.array(datab)
    datab = numpy.asarray(datab, dtype=float)

if abs(datab[0]-data[0])>1.e-7: 
    print('attention!!!!!!!')
    os.system("echo 'SCF error in'$PWD ")
    exit()
if abs(datab[1]-data[1])>1.e-7: 
    print('attention!!!!!!!')
    os.system("echo 'CCSD error in'$PWD ")
    exit()
if abs(datab[2]-data[2])>1.e-7: 
    print('attention!!!!!!!')
    os.system("echo 'CCSD(T) error in'$PWD" )
    exit()

